<?php
/**
 * 配置文件
 * by hairong.yuan
 */
// error_reporting(0);

define('ROOT_DIR', dirname(dirname(__FILE__)));


// ini_set('date.timezone','UTC');
date_default_timezone_set("Asia/Shanghai");

// 自动加载
spl_autoload_register(function ($name) {
    //$name = ucfirst($name);
    $paths = [
        "lib/$name",
    ];
    foreach($paths as $path)
    {
        $filename = ROOT_DIR . "/$path.php";
        
        if(file_exists($filename))
        {
            // Include the file
            require_once $filename;
        }
    }
});

// $db = new MysqliDb ([
//     'host' => '27.115.15.13',
//     'username' => 'dba', 
//     'password' => 'madsolution',
//     'db'=> 'kolsolution',
//     'port' => 3306,
//     'prefix' => 'tb_',
//     'charset' => 'utf8mb4'
// ]);
// obtain db object created in init  ()
// $db = MysqliDb::getInstance();



